Part Number Hot Search : 
ST10F 180BQ V16L25JI 2N519100 F9078 00AXC BL1062A1 CD5151CP
Product Description
Full Text Search
 

To Download M34250M2-086FP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  mitsubishi electric single-chip 4-bit cmos micr ocomputer rom type mask rom one time prom package 20p2n-a 20p2n-a ram size ( 5 4 bits) 64 words 64 words *: shipped after writing (shipped in blank: m34250e2fp) pin configuration (top view) m34250m2-xxxfp rom (prom) size ( 5 9 bits) 2048 words 2048 words product m34250m2-xxxfp m34250e2-xxxfp * v dd 2 3 4 5 6 7 8 9 10 1 19 18 17 16 15 14 13 12 11 20 g 2 s 0 s 1 s 2 s 3 d 3 /k d 2 /c d 1 d 0 g 3 v ss g 1 /t out g 0 /int r eset x in x out cnv ss f 0 f 1 m34250m2-xxxf p outline 20p2n-a description the 4250 group is a 4-bit single-chip microcomputer designed with cmos technology. its cpu is that of the 720 series usin g a simple instruction set. the computer is equipped with one 8- bit timer which has a reload register and the interrupt function . the various microcomputers in the 4250 group include variati ons of the built-in memory type as shown in the table below. features ? minimum instruction execution time ............................. 1.0 m s (at 4.0 mhz system clock frequency, v dd =4.5 v to 5.5 v) ? supply voltage 4.5 v to 5.5 v (at 4.0 mhz system clock frequency) 2.5 v to 5.5 v (at 1.0 mhz system clock frequency) 2.2 v to 5.5 v (at 1.0 mhz system clock frequency: only for mask rom version) ? timer timer 1 ................................ 8-bit timer with a reload register ? interrupt ............................................................ ....... 2 sources ? cr oscillation circuit (capacitor and resistor connected externally) ? logic operation instruction ? ram back-up function ? key-on wakeup function (ports g and s, int pin) application electric household appliances, consumer electronics products (mouse, etc.) mitsubishi microcomputers 4250 group
mitsubishi electric 2 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer ram (64 words 5 4 bits) rom (2048 words 5 9 bits) 720 series cpu core memory i/o port internal peripheral functions timer timer 1 (8 bits) system clock generating circuit x in -x out (note) note: prom 2048 words 5 9 bits register b (4 bits) register a (4 bits) register d (3 bits) register e (8 bits) stack register (sk) (4 levels) interrupt stack register (sdp) (1 level) alu (4 bits) port d 4 port s 4 port g 4 port f 2 block diagram
mitsubishi electric 3 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer performance overview function 70 1.0 m s (at 4.0 mhz system clock frequency) (refer to the electrical characteristics because the minimum instruction execution time depends on the supply voltage.) 2048 words 5 9 bits 64 words 5 4 bits four independent i/o ports; ports d 2 and d 3 are also used as ports c and k, respectively. 4-bit i/o port 1-bit i/o port; port c is also used as port d 2 . 1-bit i/o port; port k is also used as port d 3 . 2-bit i/o port 4-bit i/o port; ports g 0 and g 1 are also used as pins int and t out . interrupt input; int pin is also used as port g 0 . timer output; t out pin is also used as port g 1 . 8-bit timer with a reload register 2 (one for external and one for timer) 1 level cr oscillation circuit (a capacitor and a resistor connected externally) frequency error: 17 % (v dd = 5 v 10 %, v dd = 3 v 10 %, the error of the external capacitor and resistor excluded) 4 levels cmos silicon gate 20-pin plastic molded sop (20p2n-a) e20 c to 85 c 2.2 v to 5.5 v (refer to the electrical characteristics because the supply voltage depends on the system clock frequency.) 1.5 ma (at 4.0 mhz system clock frequency, v dd = 5 v, output transistors in the cut-off state) 0.1 m a (at room temperature, v dd = 5 v, output transistors in the cut-off state) parameter number of basic instructions minimum instruction execution time memory sizes input/output ports timer interrupt oscillation circuit subroutine nesting device structure package operating temperature range supply voltage power dissipation (typical value) rom ram d 0 ed 3 s 0 es 3 c k f 0 , f 1 g 0 eg 3 int t out timer 1 sources nesting active mode ram back-up mode m34250m2/ e2 i/o i/o i/o i/o i/o i/o input output
mitsubishi electric 4 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer pin description name power supply ground cnv ss reset input system clock input system clock output i/o port f i/o port g i/o port s i/o port d i/o port c i/o port k timer output interrupt input input/output ? ? ? input input output i/o i/o i/o i/o i/o i/o output input function connected to a plus power supply. connected to a 0 v power supply. connect cnv ss to v ss and apply l (0v) to cnv ss certainly. reset pulse input pin i/o pins of the system clock generating circuit. connect pins x in and x out directly. then, pull up x in pin through a resistor and pull down x out pin through a capacitor. 2-bit i/o port; for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. 4-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. every pin of the ports has a key-on wakeup function and a pull-up function. both functions can be switched by software. ports g 0 and g 1 are also used as pins int and t out , respectively. 4-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. every pin of the ports has a key-on wakeup function which can be switched by software. also, it is used to perform the logic operation using register a. each pin of port d has an independent 1-bit wide i/o function. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. ports d 2 and d 3 are also used as ports c and k, respectively. 1-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. port c has a pull-up function which can be switched by software. it is also used as port d 2 . 1-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. port k has a pull-up function which can be switched by software. it is also used as port d 3 . t out pin has the function to output the timer 1 underflow signal divided by 2. it is also used as port g 1 . int pin accepts an external interrupt. it also accepts the input signal to return the system from the ram back-up state. it is also used as port g 0 . pin v dd v ss cnv ss reset x in x out f 0 , f 1 g 0 eg 3 s 0 es 3 d 0 ed 3 c k t out int
mitsubishi electric 5 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer multifunction pin g 0 g 1 d 2 d 3 multifunction int t out c k multifunction g 0 g 1 d 2 d 3 pin int (note 2) t out (note 2) c (note 2) k (note 2) notes 1: pins except above have just single function. 2: the i/o of ports d 2 , d 3 and g 0 , and the input of port g 1 can be used even when ports c and k and pins int and t out are selected. connections of unused pins pin f 0 , f 1 g 0 /int, g 1 /t out g 2 , g 3 s 0 es 3 connection connect to v ss pin. open or connect to v ss pin. (note 3) pin d 0 , d 1 d 2 /c, d 3 /k connection connect to v ss pin. open or connect to v ss pin. (note 1) connect to v ss pin. (note 2) notes 1: when pins g 0 /int, g 1 /t out , g 2 and g 3 are connected to v ss pin, turn off their pull-up transistors (pull-up control register pu0= 5 0 2 ) and also invalidate the key-on wakeup functions of pins g 1 /t out , g 2 and g 3 (key-on wakeup contorl register k0= 55 0 5 2 ) by software. when the pof instruction is executed while these pins are connected to v ss and the key-on wakeup functions are left valid, the system returns from ram back-up state by recognizing the return condition immediately after going into the ram back-up state. when these pins are open, turn on their pull-up transistors (pull-up control register pu0= 5 1 2 ) by software. 2: when ports s 0 es 3 are connected to v ss pin, invalidate the key-on wakeup functions (key-on wakeup contorl register k0= 555 0 2 ) by software. when the pof instruction is executed while these pins are connected to v ss and the key-on wakeup functions are left valid, the system returns from ram back-up state by recognizing the return condition immediately after going into the ram back-up state. 3: when ports d 2 /c and d 3 /k are connected to v ss pin, turn off their pull-up transistors (register pu0=0 5 2 ) by software. when these pins are open, turn on their pull-up transistors (register pu0=1 5 2 ) by software. (note when connecting to v ss and v dd ) connect the unused pins to v ss or v dd at the shortest distance and use the thick wire against noise.
mitsubishi electric 6 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer port function control bits 1 4 4 2 control instructions sd rd szd cld scp rcp snzcp oka iak osa ias lgop oga iag ofa iaf control registers pu0 k0 lo pu0, k0 pu0, k0 v1 pu0, k0 output structure n-channel open-drain n-channel open-drain n-channel open-drain n-channel open-drain input/ output i/o (4) i/o (4) i/o (4) i/o (2) remark pull-up function (programmable) logic operation function (programmable) key-on wakeup functions (programmable) pull-up functions key-on wakeup functions (only pull-up function is programmable) pull-up functions (programmable) key-on wakeup functions (programmable) pin d 0 , d 1 d 2 /c d 3 /k s 0 es 3 g 0 /int g 1 /t out g 2 , g 3 f 0 , f 1 port port d port s port g port f definition of clock and cycle system clock this is the source clock input to the x in pin. connect pins x in and x out directly. then, pull up x in pin through a resistor and pull down x out pin through a capacitor. instruction clock the instruction clock is a signal derived by dividing the system clock by 4, and is the basic clock for controlling this product. machine cycle one machine cycle is the time required to execute the minimum instruction (one-cycle instruction). the machine cycle is equivalent to the instruction clock cycle.
mitsubishi electric 7 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer (3) port k 1-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is the n-channel open-drain. the pull-up transistor of port k is turned on when the bit 1 of register pu0 is set to 1 by software. port k is also used as port d 3 . accordingly, when port d 3 /k is used as port k, set the port d 3 output latch to 1. (4) port g (g 0 eg 3 ) 4-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is the n-channel open-drain. the pull-up transistor of port g is turned on when the bit 0 of register pu0 is set to 1 by software. ports g 0 and g 1 are also used as int pin and t out pin, respectively. note: w represents write enabled. pull-up control register pu0 1 pu0 0 pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on ports c and k pull-up transistor control bit ports g 0 eg 3 pull-up transistor control bit pull-up control register pu0 at reset : 00 2 at ram back-up : state retained 0 1 0 1 w i/o port (1) port d (d 0 ed 3 ) each pin of port d has an independent 1-bit wide i/o function. each pin has an output latch. for input/output of ports d 0 ed 3 , select one of port d with the register y of data pointer first. for input use, set the latch of the specified bit to 1. all port d output latches can be set to 1 with the cld instruction. the output structure is the n-channel open-drain. ports d 2 and d 3 are also used as ports c and k, respectively. accordingly, when port d 2 /c is used as port d 2 , set the port c output latch to 1. when port d 3 /k is used as port d 3 , set the port k output latch to 1. (2) port c 1-bit i/o port. port c output latch can be set to 1 with the scp instruction. port c output latch can be cleared to 0 with the rcp instruction. port c input level can be examined by executing the skip (snzcp) instruction. for input use, set the latch of the specified bit to 1. the output structure is the n-channel open-drain. the pull-up transistor of port c is turned on when the bit 1 of register pu0 is set to 1 by software. port c is also used as port d 2 . accordingly, when port d 2 /c is used as port c, set the port d 2 output latch to 1.
mitsubishi electric 8 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer functions xor operation or operation and operation not available logic operation function selection bits logic operation selection register lo at reset : 00 2 at ram back-up : 00 2 lo 1 0 0 1 1 w lo 0 0 1 0 1 lo 1 lo 0 note: w represents write enabled. logic operation selection register (5) port f (f 0 , f 1 ) 2-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is the n-channel open-drain. (6) port s (s 0 es 3 ) 4-bit i/o port. port s has the logic operation (lgop) function. for input (logic operation included) use, set the latch of the specified bit to 1. the output structure is the n-channel open-drain. when performing the logic operation, select the logic operation function with the logic operation selection register lo. set the contents of register lo through register a with the tloa instruction. when the lgop instruction is executed, the logic operation selected with the register lo is performed between the contents of register a and the contents of port s, and its result is stored in register a.
mitsubishi electric 9 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer port block diagrams d t q register a aj f 0 , f 1 ofa instruction iaf instruction register a ai osa instruction key-on wakeup input d t q s 0 ? 3 k0 0 ias instruction ai lgop instruction lo register s rq skip decision (szd instruction) d 0 , d 1 decoder register y sd instruction rd instruction scp instruction rcp instruction s rq s rq skip decision (szd instruction) d 2 /c skip decision (snzcp instruction) pu0 1 pull-up transistor decoder register y sd instruction rd instruction (note 1) (note 1) (note 1) (note 3) (note 2) (note 2) (note 1) d 3 /k d t q s rq skip decision (szd instruction) a 0 oka instruction iak instruction pull-up transistor pu0 1 register a decoder register y sd instruction rd instruction (note 1) this symbol represents a parasitic diode. applied potential to ports d 0 , d 1 , f 0 , f 1 , s 0 ? 3 must be 7v or less. applied potential to ports d 2 , d 3 must be v dd or less. i represents 0, 1, 2 or 3. j represents 0 or 1. cld instruction cld instruction cld instruction logic operator note s 1: 2: 3:
mitsubishi electric 10 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer port block diagrams (continued) 2: (note 1) (note 1) oga instruction d t q iag instruction register a a 0 pu0 0 g 0 /int pull-up transistor exf0 key-on wakeup input k0 2 0 1 falling rising external interrupt oga instruction d t q iag instruction register a a 1 key-on wakeup input pu0 0 g 1 /t out timer 1 underflow signal output 1 0 v1 3 k0 1 1/2 this symbol represents a parasitic diode. notes 1: oga instruction d t q iag instruction register a ak key-on wakeup input pu0 0 g 2 , g 3 k0 1 (note 1) (note 2) pull-up transistor pull-up transistor one-sided edge detection circuit applied potential to ports g 0 eg 3 must be v dd or less. k represents 2 or 3.
mitsubishi electric 11 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 1 amc instruction execution example fig. 2 rar instruction execution example fig. 3 registers a, b and register e (cy) (m(dp)) (a) addition alu cy a 3 a 2 a 1 a 0 a 0 cy a 3 a 2 a 1 rar instruction sc instruction rc instruction a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 e 7 e 6 e 5 e 4 e 3 e 2 e 1 e 0 a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 tab instruction teab instruction tabe instruction tba instruction register b register a register b register a register e fig. 4 tabp p instruction execution example function block operations cpu (1) arithmetic logic unit (alu) the arithmetic logic unit alu performs 4-bit arithmetic such as 4-bit data addition, comparison, and bit manipulation. (2) register a and carry flag register a is a 4-bit register used for arithmetic, transfer, exchange, and i/o operation. carry flag cy is a 1-bit flag that is set to ??when there is a carry with the amc instruction (figure 1). it is unchanged with both a n instruction and am instruction. the value of a 0 is stored in carry flag cy with the rar instruction (figure 2). carry flag cy can be set to ??with the sc instruction and cleared to ??with the rc instruction. (3) registers b and e register b is a 4-bit register used for temporary storage of 4- bit data, and for 8-bit data transfer together with register a. register e is an 8-bit register. it can be used for 8-bit data transfer with register b used as the high-order 4 bits and register a as the low-order 4 bits (figure 3). (4) register d register d is a 3-bit register. it is used to store a 7-bit rom address together with register a and is used as a pointer within the specified page when the tabp p, bla p, or bmla p instruction is executed (figure 4). specifying address tabp p instruction p 3 p 2 p 1 p 0 pc h dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 pc l immediate field value p the contents of register d rom 840 middle-order 4 bits low-order 4 bits register a (4) register b (4) the contents of register a
mitsubishi electric 12 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 5 stack registers (sks) structure fig. 6 example of operation at subroutine call sk 0 sk 1 sk 2 sk 3 (sp) = 0 (sp) = 1 (sp) = 2 (sp) = 3 program counter (pc) executing rt instruction executing bm instruction stack pointer (sp) points 3 at reset or returning from ram back-up mode. it points 0 by executing the first bm instruction, and the contents of program counter is stored in sk 0 . when the bm instruction is executed after four stack registers are used ((sp) = 3), (sp) = 0 and the contents of sk 0 is destroyed. returning to the bm instruction execution address with the rt instruction, and the bm instruction is equivalent to the nop instruction. (sp) 0 (sk 0 ) 0001 16 (pc) sub1 main program 0002 16 nop address 0000 16 nop 0001 16 bm sub1 subroutine sub1 : nop rt (pc) (sk 0 ) (sp) 3 note: (5) stack registers (sk s ) and stack pointer (sp) stack registers (sks) are used to temporarily store the contents of program counter (pc) just before branching until returning to the original routine when; branching to an interrupt service routine (referred to as an interrupt service routine), performing a subroutine call, or executing the table reference instruction (tabp p). stack registers (sks) are four identical registers, so that subroutines can be nested up to 4 levels. however, one of stack registers is used respectively when using an interrupt service routine and when executing a table reference instruction. accordingly, be careful not to over the stack when performing these operations together. the contents of registers sks are destroyed when 4 levels are exceeded. the register sk nesting level is pointed automatically by 2-bit stack pointer (sp). figure 5 shows the stack registers (sks) structure. figure 6 shows the example of operation at subroutine call. (6) interrupt stack register (sdp) interrupt stack register (sdp) is a 1-stage register. when an interrupt occurs, this register (sdp) is used to temporarily store the contents of data pointer, carry flag and skip flag just before an interrupt until returning to the original routine. unlike the stack registers (sks), this register (sdp) is not used when executing the subroutine call instruction and the table reference instruction. (7) skip flag skip flag controls skip decision for the conditional skip instructions and continuous described skip instructions. when an interrupt occurs, the contents of skip flag is stored automatically in the interrupt stack register (sdp) and the skip condition is retained.
mitsubishi electric 13 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 7 program counter (pc) structure fig. 8 data pointer (dp) structure fig. 9 sd instruction execution example p 3 p 2 p 1 p 0 a 6 a 5 a 4 a 3 a 2 a 1 a 0 program counter (pc) pc h specifying page pc l specifying address x 1 x 0 y 3 y 2 y 1 y 0 data pointer (dp) register x ( 2 ) register y (4) specifying ram digit specifying ram file 1 0 0 10 set specifying bit position port d output latch register y (4) d 2 d 3 d 1 d 0 (8) program counter (pc) program counter (pc) is used to specify a rom address (page and address). it determines a sequence in which instructions stored in rom are read. it is a binary counter that increments the number of instruction bytes each time an instruction is executed. however, the value changes to a specified address when branch instructions, subroutine call instructions, return instructions, or the table reference instruction (tabp p) is executed. program counter consists of pc h (most significant bit to bit 7) which specifies to a rom page and pc l (bits 6 to 0) which specifies an address within a page. after it reaches the last address (address 127) of a page, it specifies address 0 of the next page (figure 7). make sure that the pc h does not exceed after the last page of the built-in rom. (9) data pointer (dp) data pointer (dp) is used to specify a ram address and consists of registers x and y. register x specifies a file and register y specifies a ram digit (figure 8). register y is also used to specify the port d bit position. when using port d, set the port d bit position to register y certainly and execute the sd, rd, or szd instruction (figure 9).
mitsubishi electric 14 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 10 rom map of m34250m2 fig. 11 page 1 (addresses 0080 16 to 00ff 16 ) structure fig. 12 ram map a part of page 1 (addresses 0080 16 to 00ff 16 ) is reserved for interrupt addresses (figure 11). when an interrupt occurs, the address (interrupt address) corresponding to each interrupt is set in the program counter, and the instruction at the interrupt address is executed. when using an interrupt service routine, write the instruction generating the branch to that routine at an interrupt address. page 2 (addresses 0100 16 to 017f 16 ) is the special page for subroutine calls. subroutines written in this page can be called from any page with the 1-word instruction (bm). subroutines extending from page 2 to another page can also be called with the bm instruction when it starts on page 2. rom pattern (bits 7 to 0) of all addresses can be used as data areas with the tabp p instruction. data memory (ram) 1 word of ram is composed of 4 bits, but 1-bit manipulation (with the sb j, rb j, and szb j instructions) is enabled for the entire memory area. a ram address is specified by a data pointer. the data pointer consists of registers x and y. set a value to the data pointer certainly when executing an instruction to access ram. table 2 shows the ram size. figure 12 shows the ram map. table 2 ram size product m34250m2 m34250e2 ram size 64 words 5 4 bits (256 bits) 0 876 54321 interrupt address page 0000 16 0080 16 017 f 16 subroutine special page 007 f 16 00 ff 16 0100 16 07 ff 16 0180 16 page 1 page 2 page 0 page 3 page 15 0 8765 4321 external interrupt address timer 1 interrupt address 0080 16 0082 16 00ff 16 register y register x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 01 ram 64 words 5 4 bits (256 bits) 23 64 words program memory (rom) the program memory is a mask rom. 1 word of rom is composed of 9 bits. rom is separated every 128 words by the unit of page (addresses 0 to 127). table 1 shows the rom size and pages. figure 10 shows the rom map of m34250m2. table 1 rom size and pages product m34250m2 m34250e2 rom size ( 5 9 bits) 2048 words pages 16 (0 to 15)
mitsubishi electric 15 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer table 4 interrupt request flag, interrupt enable bit and skip instruction request flag exf0 t1f interrupt name external interrupt timer 1 interrupt enable bit v1 0 v1 1 skip instruction snz0 snz1 table 5 interrupt enable bit function occurrence of interrupt request enabled disabled skip instruction invalid valid interrupt enable bit 1 0 interrupt function the interrupt type is a vectored interrupt branching to an individual address (interrupt address) according to each in- terrupt source. an interrupt occurs when the following 3 conditions are satisfied. an interrupt activated condition is satisfied (request flag = 1) interrupt enable bit = 1 (interrupt request occurrence enabled) interrupt enable flag (inte) = 1 (interrupt enabled) table 3 shows interrupt sources. (refer to each interrupt request flag for details of activated conditions.) (1) interrupt enable flag (inte) the interrupt enable flag (inte) controls whether the every interrupt enable/disable. interrupts are enabled when inte flag is set to 1 with the ei instruction and disabled when inte flag is cleared to 0 with the di instruction. when any interrupt occurs, the inte flag is automatically cleared to 0, so that other interrupts are disabled until the ei instruction is executed. (2) interrupt enable bit (v1 0 , v1 1 ) use an interrupt enable bit of interrupt control register v1 to select the corresponding interrupt or skip instruc- tion. table 4 shows the interrupt request flag, interrupt en- able bit and skip instruction. table 5 shows the interrupt enable bit function. (3) interrupt request flag when the activated condition for each interrupt is sat- isfied, the corresponding interrupt request flag is set to 1. each interrupt request flag is cleared to 0 when either; an interrupt occurs, or the next instruction is skipped with a skip instruc- tion. each interrupt request flag is set when the activated condition is satisfied even if the interrupt is disabled by the inte flag or its interrupt enable bit. once set, the interrupt request flag retains set until a clear con- dition is satisfied. accordingly, an interrupt occurs when the interrupt dis- able state is released while the interrupt request flag is set. if more than one interrupt request flag is set when the interrupt disable state is released, the interrupt priority level is as follows shown in table 3. table 3 interrupt sources priority level 1 2 interrupt name external interrupt timer 1 interrupt interrupt address address 0 in page 1 address 2 in page 1 activated condition level change of int pin timer 1 underflow
mitsubishi electric 16 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer program counter (pc) ........... each interrupt address stack register (sk) interrupt enable flag (inte) ...... 0 (interrupt disabled) interrupt request flag (only the flag for the current interrupt source) ...................................................................... 0 data pointer, carry flag, skip flag ......... stored in the interrupt stack register (sdp) automatically the address of main routine to be executed when returning fig. 14 internal state when interrupt occurs t1f v1 1 exf0 v1 0 address 2 in page 1 address 0 in page 1 request flag (state retained) enable bit enable flag activated condition int pin (l h or h l input) timer 1 underflow ei rti interrupt service routine interrupt occurs interrupt is enabled main routine : interrupt enabled state : interrupt disabled state (4) internal state during an interrupt the internal state of the microcomputer during an in- terrupt is as follows (figure 14). program counter (pc) an interrupt address is set in program counter. the address to be executed when returning to the main routine is automatically stored in the stack register (sk). interrupt enable flag (inte) inte flag is cleared to ??so that interrupts are disa- bled. interrupt request flag only the request flag for the current interrupt source is cleared to ?. data pointer, carry flag and skip flag the contents of these pointer and flags are stored automatically in the interrupt stack register (sdp). (5) interrupt processing when an interrupt occurs, a program at an interrupt address is executed after branching a data store se- quence to stack register. write the branch instruction to an interrupt service routine at an interrupt address. use the rti instruction to return to main routine. interrupt enabled by executing the ei instruction is per- formed after executing 1 instruction (just after the next instruction is executed). accordingly, when the ei in- struction is executed just before the rti instruction, interrupts are enabled after returning the main routine. (refer to figure 13) fig. 13 program example of interrupt processing fig. 15 interrupt system diagram
mitsubishi electric 17 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer (6) control register related to interrupt timer control register v1 interrupt enable bits of external and timer 1 are assigned to register v1. set the contents of this register through register a with the tv1a instruction. the tav1 instruction can be used to transfer the contents of register v1 to register a. (7) interrupt sequence interrupts occur only when the respective inte flag, interrupt enable bits (v1 0 , v1 1 ), and interrupt request flags (exf0, t1f) are 1. the interrupt actually occurs 2 to 3 machine cycles after the cycle in which all three conditions are satisfied. the interrupt occurs after 3 machine cycles only when the three interrupt conditions are satisfied on execution of other than one-cycle instructions (refer to figure 16). fig. 16 interrupt sequence table 6 control register related to interrupt v1 3 v1 2 v1 1 v1 0 timer control register v1 g 1 /t out pin function selection bit prescaler/timer 1 operation start bit timer 1 interrupt enable bit external interrupt enable bit port g 1 (i/o) t out pin (output)/port g 1 (input) prescaler stop (initial state) / timer 1 stop (state retained) prescaler / timer 1 operation interrupt disabled (snz1 instruction is valid) interrupt enabled (snz1 instruction is invalid) interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) 0 1 0 1 0 1 0 1 note: r represents read enabled, and w represents write enabled. at reset : 0000 2 r/w at ram back-up : 0000 2 t 1 t 2 t 3 t 4 t 1 t 2 t 3 t 4 t 1 t 2 t 3 t 4 t 1 t 2 t 3 t 4 t 1 t 2 t 3 t 4 2 to 3 machine cycles (notes 1, 2) software starts from the interrupt address. flag cleared interrupt enabled state. l when an interrupt request flag is set after its interrupt is enabled f (x in ) ei instruction execution cycle interrupt enable flag (inte) retaining level for 5 cycles or more of f(x in ) is necessary. interrupt disabled state. exf0 flag t1f flag g 0 /int pin external interrupt timer 1 interrupt interrupt activated condition is satisfied. 1 machine cycle the address is stacked to the last cycle. this interval of cycles depends on the executed instruction at the time when each interrupt activated condition is satisfied. notes 1: 2:
mitsubishi electric 18 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer external interrupts the 4250 group has an external interrupt. an external interrupt request occurs when a valid waveform is input to an interrupt input pin (edge detection). the external interrupt can be controlled with the key-on wakeup control register k0. table 7 external interrupt activated condition name external interrupt input pin g 0 /int valid waveform falling waveform (h ? l) rising waveform (l ? h) valid waveform selection bit(k0 2 ) 1 0 fig. 17 external interrupt circuit structure oga instruction d t q iag instruction register a a 0 pu0 0 g 0 /int pin pull-up transistor exf0 key-on wakeup input k0 2 0 1 falling rising external interrupt (note) this symbol represents a parasitic diode. note: applied potential to port g 0 must be v dd or less. one-sided edge detection circuit
mitsubishi electric 19 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer k0 3 k0 2 k0 1 k0 0 instruction clock divided by 4 instruction clock divided by 512 rising waveform (l ? h) falling waveform (h ? l) key-on wakeup not used key-on wakeup used (l level recognized) key-on wakeup not used key-on wakeup used (l level recognized) prescaler dividing ratio selection bit interrupt valid waveform for int pin/ key-on wakeup valid waveform selection bit (note 2) ports g 1 eg 3 key-on wakeup control bit ports s 0 es 3 key-on wakeup control bit key-on wakeup control register k0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w notes 1: r represents read enabled, and w represents write enabled. 2: set a value to the bit 2 of register k0, and execute the snz0 instruction to clear the exf0 flag to 0 after executing at least one instruction. according to the input state of g 0 /int pin, the external interrupt request flag (exf0) may be set to 1 when the interrupt valid waveform is changed. (1) external interrupt request flag (exf0) external interrupt request flag (exf0) is set to 1 when a valid waveform is input to g 0 /int pin. the valid waveforms causing the interrupt must be retained at their level for 5 cycles or more of f(x in ) (refer to figure 16). the state of exf0 flag can be examined with the skip instruction (snz0). use the timer control register v1 to select the interrupt or the skip instruction. the exf0 flag is cleared to 0 when an interrupt occurs or when the next instruction is skipped with the skip instruction. external interrupt activated condition external interrupt activated condition is satisfied when a valid waveform is input to g 0 /int pin. the valid waveform can be selected from rising waveform or falling waveform. an example of how to use the external interrupt is as follows. select the valid waveform with the bit 2 of register k0. clear the exf0 flag to 0 with the snz0 instruction. a set the nop instruction for the case when a skip is performed with the snz0 instruction. ? set both the external interrupt enable bit (v1 0 ) and the inte flag to 1. the external interrupt is now enabled. now when a valid waveform is input to the g 0 /int pin, the exf0 flag is set to 1 and the external interrupt occurs. (2) control register related to external interrupt key-on wakeup control register k0 register k0 controls the valid waveform for the external interrupt and key-on wakeup function. set the contents of this register through register a with the tk0a instruction. the tak0 instruction can be used to transfer the contents of register k0 to register a. table 8 control register related to external interrupt
mitsubishi electric 20 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 18 auto-reload function ff 16 n 00 16 n : counter initial value count starts reload reload 1st underflow 2nd underflow n+1 count n+1 count time an interrupt occurs or a skip instruction is executed. timer 1 interrupt request flag the contents of counter timers the 4250 group has the programmable timer. programmable timer the programmable timer has a reload register and enables the frequency dividing ratio to be set. it is decremented from a setting value n. when it underflows (count to n + 1), a timer interrupt request flag is set to ?,?new data is loaded from the reload register, and count continues (auto-reload function).
mitsubishi electric 21 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer the 4250 group timer consists of the following circuits. prescaler : frequency divider timer 1 : 8-bit programmable timer with the interrupt function these timers can be controlled with the timer control register v1 and key-on wakeup control register k0. each function is described below. table 9 function related timers circuit prescaler timer 1 structure frequency divider 8-bit programmable binary down counter count source instruction clock prescaler output (orclk) frequency dividing ratio 4, 512 1 to 256 use of output signal timer 1 count source t out pin timer 1 interrupt fig. 19 timers structure control register v1 k0 v1 count source is stopped by clearing to 0. data is automatically set from a reload register when timer 1 underflows (auto-reload function). timer 1 reload register r 1(8) timer 1 (8) register b(4) t1f timer 1 interrupt tab1 instruction register a(4) tab1 instruction bit 7 bit 0 1/2 1 0 v1 3 g 1 output g 1 /t out t1ab instruction g 1 input instruction clock x in orclk 1/4 1/512 v1 2 0 1 0 1 k0 3 prescaler 1 0 v1 2 (note) timer 1 underflow signal internal clock generating circuit (divided by 4) note: :
mitsubishi electric 22 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer table 10 control registers related to timer v1 3 v1 2 v1 1 v1 0 timer control register v1 port g 1 (i/o) t out pin (output)/port g 1 (input) prescaler stop (initial state) / timer 1 stop (state retained) prescaler / timer 1 operation interrupt disabled (snz1 instruction is valid) interrupt enabled (snz1 instruction is invalid) interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) 0 1 0 1 0 1 0 1 g 1 /t out pin function selection bit prescaler/timer 1 operation start bit timer 1 interrupt enable bit external interrupt enable bit notes 1: r represents read enabled, and w represents write enabled. 2: set a value to the bit 2 of register k0, and execute the snz0 instruction to clear the exf0 flag to 0 after executing at least one instruction. according to the input state of g 0 /int pin, the external interrupt request flag (exf0) may be set to 1 when the interrupt valid waveform is changed. at reset : 0000 2 r/w at ram back-up : 0000 2 k0 3 k0 2 k0 1 k0 0 instruction clock divided by 4 instruction clock divided by 512 rising waveform (l ? h) falling waveform (h ? l) key-on wakeup not used key-on wakeup used (l level recognized) key-on wakeup not used key-on wakeup used (l level recognized) prescaler dividing ratio selection bit interrupt valid waveform for int pin/ key-on wakeup valid waveform selection bit (note 2) ports g 1 eg 3 key-on wakeup control bit ports s 0 es 3 key-on wakeup control bit key-on wakeup control register k0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w
mitsubishi electric 23 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer (5) timer output pin (g 1 /t out ) timer output pin (g 1 /t out ) has the function to output the timer 1 underflow signal divided by 2. the selection of g 1 /t out pin function can be controlled with the bit 3 of register v1. (6) timer interrupt request flag (t1f) timer interrupt request flag is set to 1 when the timer underflows. the state of this flag can be examined with the skip instruction (snz1). use the register v1 to select an interrupt or a skip instruction. t1f flag is cleared to 0 when an interrupt occurs or when the next instruction is skipped with a skip instruction. (1) control registers related to timer timer control register v1 g 1 /t out pin function selection bit and prescaler/timer 1 operation start bit are assigned to register v1. set the contents of this register through register a with the tv1a instruction. the tav1 instruction can be used to transfer the contents of register v1 to register a. key-on wakeup control register k0 prescaler dividing ratio selection bit is assigned to register k0. set the contents of this register through register a with the tk0a instruction. the tak0 instruction can be used to transfer the contents of register k0 to register a. (2) precautions note the following for the use of timers. prescaler stop the prescaler operation to change its frequency dividing ratio. reading the count value stop timer 1 counting and then execute the tab1 instruction to read its data. (3) prescaler prescaler is a frequency divider. its frequency dividing ratio can be selected. the count source of prescaler is the instruction clock. use the bit 3 of register k0 to select the prescaler dividing ratio and the bit 2 of register v1 to start and stop its operation. prescaler is initialized, and the output signal (orclk) stops when the bit 2 of register v1 is cleared to 0. (4) timer 1 (interrupt function) timer 1 is an 8-bit binary down counter with the timer 1 reload register (r1). data can be set simultaneously in timer 1 and the reload register (r1) with the t1ab instruction. timer 1 starts counting after the following process; set data in timer 1, and set the bit 2 of register v1 to 1. once count is started, when timer 1 underflows (the next count pulse is input after the contents of timer 1 becomes 0), the timer 1 interrupt request flag (t1f) is set to 1, new data is loaded from reload register r1, and count continues (auto- reload function). when a value set in reload register r1 is n, timer 1 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 1 to registers a and b with the tab1 instruction. when reading the data, stop the counter and then execute the tab1 instruction. timer 1 underflow signal divided by 2 can be output from g 1 /t out pin.
mitsubishi electric 24 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer f(x in ) reset the number of clock cycles depends on the internal state of the microcomputer when reset is performed. software starts (address 0 in page 0) 3584 to 3585 machine cycles fig. 20 reset release timing fig. 21 reset pin input waveform and reset operation reset function system reset is performed by applying l level to reset pin for 1 machine cycle or more when the following condition is satisfied; the value of supply voltage is the minimum value or more of the recommended operating conditions. then when h level is applied to reset pin, software starts from address 0 in page 0. keep the value of supply voltage the minimum value or more of the recommended operating conditions. reset software starts (address 0 in page 0) reset input 1 machine cycle or more 0.1v dd 3584 to 3585 machine cycles (note) note : = 0.85v dd
mitsubishi electric 25 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 22 power-on reset circuit example (2) internal state at reset table 11 shows port state at reset, and figure 23 shows internal state at reset (they are retained after system is released from reset). table 11 port state at reset the contents of timers, registers, flags and ram except shown in figure 23 are undefined, so set the initial value to them. name d 0 , d 1 , d 2 /c, d 3 /k s 0 es 3 g 0 /int, g 1 /t out g 2 , g 3 f 0 , f 1 state high impedance (note) function d 0 , d 1 , d 2 /c, d 3 /k s 0 es 3 g 0 /int, g 1 g 2 , g 3 f 0 , f 1 note: output latch is set to 1. (1) power-on reset reset can be automatically performed at power on (power-on reset) by connecting a resistor, a diode, and a capacitor to reset pin. connect reset pin and the external circuit at the shortest distance. v dd v dd reset pin voltage internal reset signal power-on reset pin this symbol represents a parasitic diode. internal reset signal reset state reset released note: applied potential to reset pin must be 7 v or less.
mitsubishi electric 26 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer program counter (pc) .............................................................. address 0 in page 0 is set to program counter. interrupt enable flag (inte) ..................................................... power down flag (p) ................................................................. external interrupt request flag (exf0) ..................................... timer 1 interrupt request flag (t1f) ........................................ timer control register v1 ......................................................... key-on wakeup control register k0 ......................................... pull-up control register pu0 ..................................................... logic operation selection register lo ...................................... carry flag (cy) ......................................................................... register a ................................................................................. register b ................................................................................. stack pointer (sp) .................................................................... 00000000000 0 (interrupt disabled) 0 0 0 0000 (interrupt disabled, prescaler/timer 1 stopped) 0000 00 00 0 1111 1111 11 fig. 23 internal state at reset
mitsubishi electric 27 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer remarks select the return edge (rising edge or falling edge) with the bit 2 of register k0 according to the external state before going into the ram back-up state. set the port using the key-on wakeup function selected with register k0 to h level before going into the ram back-up state. return source g 0 /int pin ports g 1 eg 3 s 0 es 3 return condition return by an external rising edge input (l ? h) or falling edge input (h ? l). the exf0 flag is not set. return by an external l level input. table 13 return source and return condition note: g 0 /int pin and ports g 1 eg 3 , s 0 es 3 share the circuit which is used to detect the edge and to recognize l level. the g 0 /int pin cannot be set to no key-on wakeup. ram back-up mode the 4250 group has the ram back-up mode. when the pof instruction is executed continuously, system enters the ram back-up state. as oscillation stops retaining ram, the function of reset circuit and states at ram back-up mode, current dissipation can be reduced without losing the contents of ram. table 12 shows the function and states retained at ram back-up. figure 24 shows the state transition. (1) identification of the start condition warm start (return from the ram back-up state) or cold start (return from the normal reset state) can be identified by examining the state of the power down flag (p) with the snzp instruction. (2) warm start condition when the external wakeup signal is input after the system enters the ram back-up state by executing the pof instruction continuously, the cpu starts executing the software from address 0 in page 0. in this case, the p flag is 1. (3) cold start condition the cpu starts executing the software from address 0 in page 0 when reset pulse is input to reset pin. in this case, the p flag is 0. (4) return signal an external wakeup signal is used to return from the ram back-up mode. table 13 shows the return condition for each return source. table 12 functions and states retained at ram back-up ram back-up 5 o 5 5 5 o o 5 5 5 5 function program counter (pc), registers a, b, carry flag (cy), stack pointer (sp) (note 2) contents of ram port timer control register v1 timer 1 function pull-up control register pu0 key-on wakeup control register k0 logic operation selection register lo external interrupt request flag (exf0) timer 1 interrupt request flag (t1f) interrupt enable flag (inte) notes 1: o represents that the function can be retained, and 5 represents that the function is initialized. registers and flags other than the above are undefined at ram back-up, and set an initial value after returning. 2:the stack pointer (sp) points the level of the stack register and is initialized to 3 at ram back-up.
mitsubishi electric 28 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer : microcomputer starts its operation after 3584 to 3585 machine cycles for the time required to stabilize the f(x in ) oscillation. stabilizing time a pof instruction is executed a f(x in ) oscillation return input b (ram back-up mode) f(x in ) stop reset (stabilizing time a ) (stabilizing time a ) k0 3 k0 2 k0 1 k0 0 instruction clock divided by 4 instruction clock divided by 512 rising waveform (?? ?? falling waveform (?? ?? key-on wakeup not used key-on wakeup used (??level recognized) key-on wakeup not used key-on wakeup used (??level recognized) prescaler dividing ratio selection bit interrupt valid waveform for int pin/ key-on wakeup valid waveform selection bit (note 2) ports g 1 ? 3 key-on wakeup control bit ports s 0 ? 3 key-on wakeup control bit key-on wakeup control register k0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w notes 1: ??represents read enabled, and ??represents write enabled. 2: set a value to the bit 2 of register k0, and execute the snz0 instruction to clear the exf0 flag after executing at least one instruction. according to the input state of g 0 /int pin, the external interrupt request flag (exf0) may be set when the interrupt valid waveform is changed. table 14 key-on wakeup control register fig. 24 state transition s r q power down flag p pof instruction reset input l set source pof instruction is executed l clear source reset input fig. 25 set source and clear source of the p flag fig. 26 start condition identified example using the snzp instruction software start p = ? ? yes warm start cold start no (5) key-on wakeup control register k0 key-on wakeup control register k0 the interrupt valid waveform for int pin/key-on wakeup valid waveform selection bit, the ports g 1 ? 3 key-on wakeup control bit and the ports s 0 ? 3 key-on wakeup control bit are assigned to the register k0. set the contents of this register through register a with the tk0a instruction. the tak0 instruction can be used to transfer the contents of register k0 to register a.
mitsubishi electric 29 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 27 clock control circuit structure clock signal f(x in ) is obtained by connecting x in pin and x out pin directly, and externally connecting a resistor to x in and a capacitor to x out . connect this external circuit to pins x in and x out at the shortest distance. when an external clock signal is input, note the input waveform (refer to the list of precaution). rom ordering method please submit the information described below when ordering mask rom. (1) m34250m2-xxxfp mask rom order confirmation form ..............................................................................................1 (2) data to be written into mask rom ......................... eprom (three sets containing the identical data) (3) mark specification form ..................................................... 1 fig. 28 resistor and capacitor external circuit clock control the clock control circuit consists of the following circuits. system clock generating circuit control circuit to stop the clock oscillation control circuit to return from the ram back-up state internal clock generating circuit (divided by 4) instruction clock reset g 0 /int pin k0 2 0 1 ports g 1 eg 3 ports s 0 es 3 key-on wakeup control register k0 0 , k0 1 counter wait time control circuit (note) software start signal note: the wait time control circuit is used to start the microcomputer operation after 3584 to 3585 machine cycles for the time required to stabilize the f(x in ) oscillation. oscillation circuit r s q pof instruction x in x out multiplexer rising falling rising detected m34250m2-xxxfp x in x out the system clock frequency is affected by a capacitor, a resistor and an lsi, so, set the constants within the range of the frequency limits.
mitsubishi electric 30 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer la 4 ; ( 555 0 2 ) tv1a ; the snz0 instruction is valid ............. la 4 tk0a ; change of the interrupt valid waveform nop .............................................................. snz0 ; the snz0 instruction is executed nop . . . fig. 29 external interrupt program example . . . 5 : this bit is not related to the setting of g 0 /int pin. list of precautions noise and latch-up prevention connect a capacitor on the following condition to prevent noise and latch-up; connect a bypass capacitor (approx. 0.01 m f) between pins v dd and v ss at the shortest distance, equalize its wiring in width and length, and use the thickest wire. in the one time prom version, cnv ss pin is also used as v pp pin. connect this pin to v ss through the resistor about 5 k w which is assigned to cnv ss /v pp pin as close as possible at the shortest distance. prescaler stop the prescaler operation to change its frequency dividing ratio. a timer count source stop timer 1 counting to change its count source. ? program counter make sure that the pc h does not specify after the last page of the built-in rom. ? g 0 /int pin when the interrupt valid waveform of the g 0 /int pin is changed with the bit 2 of register k0 in software, be careful about the following notes. after clear the bit 0 of register v1 to 0 (figure 29 ), change the interrupt valid waveform of g 0 /int pin with the bit 2 of register k0 . set a value to bit 2 of register k0 and execute the snz0 instruction to clear the external interrupt request flag (exf0) after executing at least one instruction (refer to figure 29 ). depending on the input state of the g 0 /int pin, the exf0 flag may be set when the interrupt valid waveform is changed. ? notes on unused pins when pins g 0 /int, g 1 /t out , g 2 and g 3 are connected to v ss pin, turn off their pull-up transistors (register pu0= 5 0 2 ) and also invalidate the key-on wakeup functions of pins g 1 /t out , g 2 and g 3 (register k0= 55 0 5 2 ) by software. when the pof instruction is executed while these pins are connected to v ss and the key-on wakeup functions are left valid, the system returns from ram back-up state by recognizing the return condition immediately after going into the ram back-up state. when these pins are open, turn on their pull-up transistors (register pu0= 5 1 2 ) by software. when ports s 0 es 3 are connected to v ss pin, invalidate the key-on wakeup functions (register k0= 555 0 2 ) by software. when the pof instruction is executed while these pins are connected to v ss and the key-on wakeup functions are left valid, the system returns from ram back-up state by recognizing the return condition immediately after going into the ram back-up state. when ports d 2 /c and d 3 /k are connected to v ss pin, turn off their pull-up transistors (register pu0=0 5 2 ) by software. when these pins are open, turn on their pull-up transistors (register pu0=1 5 2 ) by software. (note when connecting to v ss and v dd ) connect the unused pins to v ss or v dd at the shortest distance (within 20 mm) and use the thick wire against noise. ? multifunction g 0 /int pin can be also used as an i/o port g 0 even when it is used as int pin. g 1 /t out pin can be also used as input port g 1 even when it is used as t out pin. d 2 /c pin can be also used as i/o port d 2 even when it is used as port c. d 3 /k pin can be also used as i/o port d 3 even when it is used as port k.
mitsubishi electric 31 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer t/2 (s) t/2 (s) t (s) v dd (v) v ss (v) fig. 30 external clock input waveform ? key-on wakeup when system returns from ram back-up state by using the g 0 /int pin, select the return edge (rising edge or falling edge) with the bit 2 of register k0 according to the external state before going into the ram back-up state. when system returns from ram back-up state by using the ports g 1 eg 3 and s 0 es 3 , set the port using the key-on wakeup function selected with register k0 to h level before going into the ram back-up state. g 0 /int pin and ports g 1 eg 3 , s 0 es 3 share the circuit which is used to detect the edge and to recognize l level. the g 0 /int pin cannot be set to no key-on wakeup. external clock input waveform when the external clock is used, open x out pin, and input the clock waveform into x in pin shown below. (refer to figure 30) duty ratio = 50 %. h level input voltage= v dd ( v ), l level input voltage=v ss (v). cr oscillation constant use the external 30 pf capacitor and enable to change the frequency by the external resistor. test the system sufficiently because the oscillation constant depends on the rom type (mask rom or prom).
mitsubishi electric 32 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer symbol the symbols shown below are used in the following list of instruction function and the machine instructions. symbol a b dr e v1 k0 pu0 lo x y dp pc pc h pc l sk sp cy r1 t1 t1f inte exf0 p contents register a (4 bits) register b (4 bits) register d (3 bits) register e (8 bits) timer control register v1 (4 bits) key-on wakeup control register k0 (4 bits) pull-up control register pu0 (2 bits) logic operation selection register lo (2 bits) register x (2 bits) register y (4 bits) data pointer (6 bits) (it consists of registers x and y) program counter (11 bits) high-order 4 bits of program counter low-order 7 bits of program counter stack register (11 bits 5 4) stack pointer (2 bits) carry flag timer 1 reload register timer 1 timer 1 interrupt request flag interrupt enable flag external interrupt request flag power down flag contents port d (4 bits) port f (2 bits) port g (4 bits) port s (4 bits) port k (1 bit) port c (1 bit) hexadecimal variable hexadecimal variable hexadecimal variable hexadecimal constant which represents the immediate value hexadecimal constant which represents the immediate value binary notation of hexadecimal variable a (same for others) direction of data movement data exchange between a register and memory decision of state shown before ? contents of registers and memories negate, flag unchanged after executing instruction ram address pointed by the data pointer label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 in page p 3 p 2 p 1 p 0 hex. c + hex. number x (also same for others) symbol d f g s k c x y p n j a 3 a 2 a 1 a 0 ? ? ? ( ) ? m(dp) a p, a c + x note : the 4250 group just invalidates the next instruction when a skip is performed. the contents of program counter is not increased by 2. accordingly, the number of cycles does not change even if skip is not performed. however, the cycle count becomes 1 if the tabp p, rt, or rts instruction is skipped.
mitsubishi electric 33 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer function (a) ? n n = 0 to 15 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 edr 0 , a 3 ea 0 ) (b) ? (rom(pc)) 7 to 4 (a) ? (rom(pc)) 3 to 0 (pc) ? (sk(sp)) (sp) ? (sp) e 1 (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp)) + (cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 logic operation instruction xor, or, and (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 list of instruction function arithmetic operation register to register transfer grouping mnemonic tab tba tay tya teab tabe tda lxy x, y iny dey tam j xam j xamd j xami j function (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 ee 4 ) ? (b) (e 3 ee 0 ) ? (a) (b) ? (e 7 ee 4 ) (a) ? (e 3 ee 0 ) (dr 2 edr 0 ) ? (a 2 ea 0 ) (x) ? x, x = 0 to 3 (y) ? y, y = 0 to 15 (y) ? (y) + 1 (y) ? (y) e 1 (a) ? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (y) ? (y) e 1 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (y) ? (y) + 1 grouping mnemonic la n tabp p am amc a n sc rc szc cma rar lgop sb j rb j szb j ram to register transfer ram addresses bit operation comparison operation grouping mnemonic seam sea n b a bl p, a ba a bla p, a bm a bml p, a bmla p, a rti rt rts function (a) = (m(dp)) ? (a) = n ? n = 0 to 15 (pc l ) ? a 6 ea 0 (pc h ) ? p (pc l ) ? a 6 ea 0 (pc l ) ? (a 6 ea 4 , a 3 e a 0 ) (pc h ) ? p (pc l ) ? (a 6 ea 4 , a 3 e a 0 ) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? 2 (pc l ) ? a 6 ea 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? a 6 ea 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (a 6 ea 4 , a 3 e a 0 ) (pc) ? (sk(sp)) (sp) ? (sp) e 1 (pc) ? (sk(sp)) (sp) ? (sp) e 1 (pc) ? (sk(sp)) (sp) ? (sp) e 1 subroutine operation return operation branch operation
mitsubishi electric 34 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer list of instruction function (continued) input/output operation grouping mnemonic di ei snz0 tab1 t1ab snz1 function inte ? 0 inte ? 1 (exf0) = 1 ? after skipping the next instruction (exf0) ? 0 (b) ? (t1 7 et1 4 ) (a) ? (t1 3 et1 0 ) (r1 7 er1 4 ) ? (b) (t1 7 et1 4 ) ? (b) (r1 3 er1 0 ) ? (a) (t1 3 et1 0 ) ? (a) (t1f) = 1 ? after skipping the next instruction (t1f) ? 0 interrupt operation grouping mnemonic cld rd sd szd scp rcp snzcp ofa iaf oga iag osa ias oka iak function (d) ? 1 (d(y)) ? 0 (y) = 0 to 3 (d(y)) ? 1 (y) = 0 to 3 (d(y)) = 0 ? (y) = 0 to 3 (c) ? 1 (c) ? 0 (c) = 1? (f) ? (a 1 , a 0 ) (a 1 , a 0 ) ? (f) (a 3 , a 2 ) ? (0) (g) ? (a) (a) ? (g) (s) ? (a) (a) ? (s) (k) ? (a 0 ) (a 0 ) ? (k), (a 3 , a 2 , a 1 ) ? (0) grouping mnemonic nop pof snzp tloa tv1a tav1 tk0a tak0 tpu0a function (pc) ? (pc) + 1 ram back-up (p) = 1 ? (lo) ? (a 1 , a 0 ) (v1) ? (a) (a) ? (v1) (k0) ? (a) (a) ? (k0) (pu0) ? (a) other operation timer operation
mitsubishi electric 35 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl d3 d0 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 xam 0 hex. notation 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 to 17 the above table shows the relationship between machine language codes and machine language instructions. d 3 ? 0 show the low-order 4 bits of the machine language code, and d 8 ? 4 show the high-order 5 bits of the machine language code. the hexadecimal representation of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each instruction is shown. the codes for the second word of a two-word instruction are described below. bl bml bla bmla sea 1 1 a a a a a a a 1 0 a a a a a a a 1 1 a a a p p p p 1 0 a a a p p p p 0 1 0 1 1 n n n n the second word ba 1 1 a a a a a a a szd 0 0 0 1 0 1 0 1 1 nop rc sc am amc tya tba bla cld iny rd sd dey teab cma rar tab tay szb 0 szb 1 szb 2 szb 3 sean seam tda tabe szc rt rts rb 0 rb 1 rb 2 rb 3 iaf sb 0 sb 1 sb 2 sb 3 tabp 0 tabp 1 tabp 2 tabp 3 tabp 4 tabp 5 ofa bml bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b bm b ba bl bmla xam 1 xam 2 xam 3 tam 0 tam 1 tam 2 tam 3 xami 0 xami 1 xami 2 xami 3 xamd 0 xamd 1 xamd 2 xamd 3 bml bml bml bml bml a 2 la 0 a 13 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 12 a 14 a 15 a 10 a 11 a 0 a 1 la 1 la 2 la 3 la 4 la 5 la 6 la 7 la 8 la 9 la 10 la 11 la 12 la 13 la 14 la 15 18 to 1f lxy 0,0 lxy 1,0 lxy 2,0 lxy 0,1 lxy 1,1 lxy 2,1 lxy 0,2 lxy 1,2 lxy 2,2 lxy 0,3 lxy 1,3 lxy 2,3 lxy 0,4 lxy 1,4 lxy 2,4 lxy 0,5 lxy 1,5 lxy 2,5 lxy 0,6 lxy 1,6 lxy 2,6 lxy 0,7 lxy 1,7 lxy 2,7 snzp oga iag tv1a di ei pof lxy 3,0 lxy 3,1 lxy 3,2 lxy 3,3 lxy 3,4 lxy 3,5 lxy 3,6 lxy 3,7 snz1 snz0 lgop tloa lxy 0,8 lxy 1,8 lxy 2,8 lxy 0,9 lxy 1,9 lxy 2,9 lxy 0,10 lxy 1,10 lxy 2,10 lxy 0,11 lxy 1,11 lxy 2,11 lxy 0,12 lxy 1,12 lxy 2,12 lxy 0,13 lxy 1,13 lxy 2,13 lxy 0,14 lxy 1,14 lxy 2,14 lxy 0,15 lxy 1,15 lxy 2,15 lxy 3,8 lxy 3,9 lxy 3,10 lxy 3,11 lxy 3,12 lxy 3,13 lxy 3,14 lxy 3,15 osa szd rti ias iak bml bml oka scp rcp t1ab tk0a tav1 tak0 tab1 tpu0a snzcp tabp 6 tabp 7 bml bml bml bml bml bml bml bml tabp 8 tabp 9 tabp 10 tabp 11 tabp 12 tabp 13 tabp 14 tabp 15 do not use the code marked . a b c d e f d8?4 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10111 11111 10000 11000 instruction code table
mitsubishi electric 36 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 ee 4 ) ? (b) (e 3 ee 0 ) ? (a) (b) ? (e 7 ee 4 ) (a) ? (e 3 ee 0 ) (dr 2 edr 0 ) ? (a 2 ea 0 ) (x) ? x, x = 0 to 3 (y) ? y, y = 0 to 15 (y) ? (y) + 1 (y) ? (y) e 1 tab tba tay tya teab tabe tda lxy x, y iny dey register to register transfer 01 e 00 e 01 f 00 c 01 a 02 a 02 9 0c y +x 01 3 01 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ram addresses 000011110 000001110 000011111 000001100 000011010 000101010 000101001 011x 1 x 0 y 3 y 2 y 1 y 0 000010011 000010111 machine instructions
skip condition detailed description carry flag cy mitsubishi electric 37 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer transfers the contents of register b to register a. transfers the contents of register a to register b. transfers the contents of register y to register a. transfers the contents of register a to register y. transfers the contents of registers a and b to register e. transfers the contents of register e to registers a and b. transfers the contents of register a to register d. loads the value x in the immediate field to register x, and the value y in the immediate field to register y. when the lxy instructions are continuously coded and executed, only the first lxy instruction is executed and other lxy instructions coded continuously are skipped. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next instruction is skipped. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. e e e e e e e continuous description (y) = 0 (y) = 15 e e e e e e e e e e
mitsubishi electric 38 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 ram to register transfer tam j xam j xamd j xami j (a) ? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (y) ? (y) e 1 (a) ?? (m(dp)) (x) ? (x) exor(j) j = 0 to 3 (y) ? (y) + 1 1 1 1 1 1 1 1 1 06 4 +j 06 j 06 c +j 06 8 +j 0011001j 1 j 0 0011000j 1 j 0 0011011j 1 j 0 0011010j 1 j 0 machine instructions (continued)
skip condition detailed description carry flag cy mitsubishi electric 39 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer e e (y) = 15 (y) = 0 e e e e after transferring the contents of m(dp) to register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next instruction is skipped.
mitsubishi electric 40 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 la n tabp p am amc a n sc rc szc cma rar lgop (a) ? n n = 0 to 15 (sk(sp)) ? (pc) (sp) ? (sp) + 1 (pc h ) ? p (pc l ) ? (dr 2 edr 0 , a 3 ea 0 ) (b) ? (rom(pc)) 7 to 4 (a) ? (rom(pc)) 3 to 0 (sp) ? (sp) e 1 (pc) ? (sk(sp)) (note) (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp))+ (cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 logic operation instruction xor, or, and arithmetic operation 0b n 09 p 00 a 00 b 0a n 00 7 00 6 02 f 01 c 01 d 04 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 note : p is 0 to 15 for m34250e2, and p is 0 to 15 for m34250m2. 01011n 3 n 2 n 1 n 0 01001p 3 p 2 p 1 p 0 000001010 000001011 01010n 3 n 2 n 1 n 0 000000111 000000110 000101111 000011100 000011101 010000001 machine instructions (continued)
skip condition detailed description carry flag cy mitsubishi electric 41 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer continuous description e e e overflow = 0 e e (cy) = 0 e e e e e e 0/1 e 1 0 e e 0/1 e loads the value n in the immediate field to register a. when the la instructions are continuously coded and executed, only the first la instruction is executed and other la instructions coded continuously are skipped. transfers bits 7 to 4 to register b and bits 3 to 0 to register a. these bits 7 to 0 are the rom pattern in address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) specified by registers a and d in page p. when this instruction is executed, 1 stage of stack register is used. adds the contents of m(dp) to register a. stores the result in register a. the contents of carry flag cy remains unchanged. adds the contents of m(dp) and carry flag cy to register a. stores the result in register a and carry flag cy. adds the value n in the immediate field to register a. the contents of carry flag cy remains unchanged. skips the next instruction when there is no overflow as the result of operation. sets (1) to carry flag cy. clears (0) to carry flag cy. skips the next instruction when the contents of carry flag cy is 0. stores the one?s complement for register a?s contents in register a. rotates 1 bit of the contents of register a including the contents of carry flag cy to the right. execute the logic operation selected by logic operation selection register lo between the contents of register a and port s, and stores the result in register a.
mitsubishi electric 42 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 sb j rb j szb j seam sea n b a bl p, a ba a bla p, a (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 (a) = (m(dp)) ? (a) = n ? n = 0 to 15 (pc l ) ? a 6 ea 0 (pc h ) ? p (pc l ) ? a 6 ea 0 (note) (pc l ) ? (a 6 ea 4 , a 3 ea 0 ) (pc h ) ? p (pc l ) ? (a 6 ea 4 , a 3 ea 0 ) (note) 0010111j 1 j 0 0010011j 1 j 0 0001000j 1 j 0 000100110 000100101 01011n 3 n 2 n 1 n 0 11a 6 a 5 a 4 a 3 a 2 a 1 a 0 00011p 3 p 2 p 1 p 0 11a 6 a 5 a 4 a 3 a 2 a 1 a 0 000000001 11a 6 a 5 a 4 a 3 a 2 a 1 a 0 000010000 11a 6 a 5 a 4 p 3 p 2 p 1 p 0 05 c +j 04 c +j 02 j 02 6 02 5 0b n 18a +a 03 p 18 a +a 00 1 18 a +a 01 0 18 p +a 1 1 1 1 2 1 2 2 2 1 1 1 1 2 1 2 2 2 bit operation comparison operation note : p is 0 to 15 for m34250e2, and p is 0 to 15 for m34250m2. branch operation machine instructions (continued)
skip condition detailed description carry flag cy mitsubishi electric 43 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer sets (1) the contents of bit j (bit specified by the value j in the immediate field) of m(dp). clears (0) the contents of bit j (bit specified by the value j in the immediate field) of m(dp). skips the next instruction when the contents of bit j (bit specified by the value j in the immediate field) of m(dp) is 0. skips the next instruction when the contents of register a is equal to the contents of m(dp). skips the next instruction when the contents of register a is equal to the value n in the immediate field. branch within a page : branches to address a in the identical page. branch out of a page : branches to address a in page p. branch within a page : branches to address (a 6 a 5 a 4 a 3 a 2 a 1 a 0 ) determined by replacing the low- order 4 bits of the address a with register a in the identical page. branch out of a page : branches to address (a 6 a 5 a 4 a 3 a 2 a 1 a 0 ) determined by replacing the low- order 4 bits of the address a with register a in page p. e e e e e e e e e e e (mj(dp)) = 0 j = 0 to 3 (a) = (m(dp)) (a) = n n = 0 to 15 e e e e
mitsubishi electric 44 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 bm a bml p, a bmla p, a rti rt rts di ei snz0 1aa 07 p 1aa 05 0 1a p 04 6 04 4 04 5 00 4 00 5 08 f (sk(sp)) ? (pc) (sp) ? (sp) + 1 (pc h ) ? 2 (pc l ) ? a 6 ea 0 (sk(sp)) ? (pc) (sp) ? (sp) + 1 (pc h ) ? p (pc l ) ? a 6 ea 0 (note) (sk(sp)) ? (pc) (sp) ? (sp) + 1 (pc h ) ? p (pc l ) ? (a 6 ea 4 , a 3 ea 0 ) (note) (pc) ? (sk(sp)) (sp) ? (sp) e 1 (pc) ? (sk(sp)) (sp) ? (sp) e 1 (pc) ? (sk(sp)) (sp) ? (sp) e 1 (inte) ? 0 (inte) ? 1 (exf0) = 1 ? after skipping the next instruction (exf0) ? 0 1 2 2 1 1 1 1 1 1 1 2 2 1 2 2 1 1 1 10a 6 a 5 a 4 a 3 a 2 a 1 a 0 00111p 3 p 2 p 1 p 0 10a 6 a 5 a 4 a 3 a 2 a 1 a 0 001010000 10a 6 a 5 a 4 p 3 p 2 p 1 p 0 001000110 001000100 001000101 000000100 000000101 010001111 subroutine operation return operation interrupt operation machine instructions (continued) note : p is 0 to 15 for m34250e2, and p is 0 to 15 for m34250m2.
skip condition detailed description carry flag cy mitsubishi electric 45 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer e e e e e skip at uncondition e e (exf0) = 1 e e e e e e e e e call the subroutine in page 2 : calls the subroutine at address a in page 2. call the subroutine : calls the subroutine at address a in page p. call the subroutine : calls the subroutine at address (a 6 a 5 a 4 a 3 a 2 a 1 a 0 ) determined by replacing the low-order 4 bits of address a with register a in page p. returns from interrupt service routine to main routine. returns each value of data pointer (x, y), carry flag, skip status, nop mode status by the continuous description of the la/lxy instruction to the states just before interrupt. returns from subroutine to the routine called the subroutine. returns from subroutine to the routine called the subroutine, and skips the next instruction at uncondition. clears (0) to the interrupt enable flag inte, and disables the interrupt. sets (1) to the interrupt enable flag inte, and enables the interrupt. skips the next instruction when the contents of exf0 flag is 1. after skipping, clears the exf0 flag.
mitsubishi electric 46 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 tab1 t1ab snz1 (b) ? (t1 7 et1 4 ) (a) ? (t1 3 et1 0 ) (r1 7 er1 4 ) ? (b) (t1 7 et1 4 ) ? (b) (r1 3 er1 0 ) ? (a) (t1 3 et1 0 ) ? (a) (t1f) = 1 ? after skipping the next instruction (t1f) ? 0 08a 085 08c 010001010 010000101 010001100 1 1 1 1 1 1 cld rd sd szd 000010001 000010100 000010101 000100100 000101011 011 014 015 024 02b 1 1 1 2 1 1 1 2 (d) ? 1 (d(y)) ? 0 (y) = 0 to 3 (d(y)) ? 1 (y) = 0 to 3 (d(y)) = 0 ? (y) = 0 to 3 timer operation input/output operation machine instructions (continued)
skip condition detailed description carry flag cy mitsubishi electric 47 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer e e e e e (t1f) = 1 transfers the contents of timer 1 to registers a and b. transfers the contents of registers a and b to timer 1 and timer 1 reload register. skips the next instruction when the contents of t1f flag is 1. after skipping, clears (0) to t1f flag. e e e e e e e (d(y)) = 0 (y) = 0 to 3 sets (1) to port d (high-impedance state). clears (0) to a bit of port d specified by register y. sets (1) to a bit of port d specified by register y (high-impedance state). skips the next instruction when a bit of port d specified by register y is 0.
mitsubishi electric 48 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer instruction code function mnemonic hexadecimal notation number of words number of cycles parameter type of instructions d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 input/output operation 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (f) ? (a 1 , a 0 ) (a 1 , a 0 ) ? (f), (a 3 , a 2 ) ? 0 (g) ? (a) (a) ? (g) (s) ? (a) (a) ? (s) (k) ? (a 0 ) (a 0 ) ? (k), (a 3 ea 1 ) ? 0 (c) ? 1 (c) ? 0 (c) = 1 ? (pc) ? (pc) + 1 ram back-up (p) = 1 ? (lo) ? (a 1 , a 0 ) (v1) ? (a) (a) ? (v1) (k0) ? (a) (a) ? (k0) (pu0) ? (a) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 084 056 080 028 01b 055 081 057 082 083 08d 00 0 00 d 00 3 05 8 08 6 08 8 08 7 08 9 08 b 010000100 001010110 010000000 000101000 000011011 001010101 010000001 001010111 010000010 010000011 010001101 000000000 000001101 000000011 001011000 010000110 010001000 010000111 010001001 010001011 ofa iaf oga iag osa ias oka iak scp rcp snzcp nop pof snzp tloa tv1a tav1 tk0a tak0 tpu0a other operation machine instructions (continued)
skip condition detailed description carry flag cy mitsubishi electric 49 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer outputs the contents of register a to port f. transfers the contents of port f to register a. outputs the contents of register a to port g. transfers the contents of port g to register a. outputs the contents of register a to port s. transfers the contents of port s to register a. outputs the contents of register a to port k. transfers the contents of port k to register a. sets (1) to port c. clears (0) to port c. skips the next instruction when the contents of port c is 1. no operation puts the system in ram back-up state. skips the next instruction when p flag is 1. after skipping, p flag remains unchanged. transfers the contents of register a to the logic operation selection register lo. transfers the contents of register a to register v1. transfers the contents of register v1 to register a. transfers the contents of register a to register k0. transfers the contents of register k0 to register a. transfers the contents of register a to register pu0. e e e e e e e e e e (c) = 1 e e (p) = 1 e e e e e e e e e e e e e e e e e e e e e e e e e e
mitsubishi electric 50 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer notes 1: r represents read enabled, and w represents write enabled. 2: set a value to the bit 2 of register k0, and execute the snz0 instruction to clear the exf0 flag to 0 after executing at least one instruction. according to the input state of g 0 /int pin, the external interrupt request flag (exf0) may be set to 1 when the interrupt valid waveform is changed. control registers pu0 1 pu0 0 pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on ports c and k pull-up transistor control bit ports g 0 eg 3 pull-up transistor control bit pull-up control register pu0 at reset : 00 2 at ram back-up : state retained 0 1 0 1 w v1 3 v1 2 v1 1 v1 0 port g 1 (i/o) t out pin (output) / port g 1 (input) prescaler stop (initial state) / timer 1 stop (state retained) prescaler/timer 1 operation interrupt disabled (snz1 instruction is valid) interrupt enabled (snz1 instruction is invalid) interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) 0 1 0 1 0 1 0 1 g 1 /t out pin function selection bit prescaler/timer 1 operation start bit timer 1 interrupt enable bit external interrupt enable bit timer control register v1 r/w at reset : 0000 2 at ram back-up : 0000 2 k0 3 k0 2 k0 1 k0 0 instruction clock divided by 4 instruction clock divided by 512 rising waveform (l ? h) falling waveform (h ? l) key-on wakeup not used key-on wakeup used (l level recognized) key-on wakeup not used key-on wakeup used (l level recognized) prescaler dividing ratio selection bit interrupt valid waveform for int pin/ key-on wakeup valid waveform selection bit (note 2) ports g 1 eg 3 key-on wakeup control bit ports s 0 es 3 key-on wakeup control bit key-on wakeup control register k0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w functions xor operation or operation and operation not available logic operation function selection bits logic operation selection register lo at reset : 00 2 at ram back-up : 00 2 lo 1 0 0 1 1 w lo 0 0 1 0 1 lo 1 lo 0
mitsubishi electric 51 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer absolute maximum ratings parameter supply voltage input voltage x in , g 0 eg 3 , d 2 /c, d 3 /k input voltage f 0 , f 1 , s 0 es 3 , d 0 , d 1 , reset output voltage x out output voltage f 0 , f 1 , s 0 es 3 , d 0 , d 1 output voltage g 0 eg 3 , d 2 /c, d 3 /k power dissipation operating temperature range storage temperature range conditions output transistors in cut-off state ta = 25 c unit v v v v v v mw c c ratings e0.3 to 7.0 e0.3 to v dd +0.3 e0.3 to 8.0 e0.3 to v dd +0.3 e0.3 to 8.0 e0.3 to v dd +0.3 300 e20 to 85 e40 to 125 symbol v dd v i v i v o v o v o p d t opr t stg recommended operating conditions (ta = e20 c to 85 c, v dd = 2.2 v to 5.5 v, unless otherwise noted) parameter supply voltage ram back-up voltage (at ram back-up mode) supply voltage h level input voltage f 0 , f 1 , d 0 , d 1 h level input voltage g 0 eg 3 , d 2 , d 3 h level input voltage int h level input voltage c, k h level input voltage s 0 es 3 h level input voltage reset l level input voltage c, k l level input voltage s 0 es 3 l level input voltage f 0 , f 1 , g 0 eg 3 , d 0 ed 3 l level input voltage int l level input voltage reset l level peak output current f 0 , f 1 , s 0 es 3 , d 0 , d 1 , d 2 /c, d 3 /k l level peak output current g 0 , g 1 /t out , g 2 , g 3 l level average output current f 0 , f 1 , s 0 es 3 , d 0 , d 1 , d 2 /c, d 3 /k l level average output current g 0 , g 1 /t out , g 2 , g 3 system clock frequency (note 2) frequency error (errors of external capacitor and resistor not included) note: use the 30 pf capacitor externally and enable the change of frequency by external resistor. limits conditions 0.4 mhz f(x in ) 4.4 mhz 0.4 mhz f(x in ) 1.1 mhz v dd = 4.5 v to 5.5 v v dd = 2.2 v to 5.5 v v dd = 4.5 v to 5.5 v v dd = 2.2 v to 5.5 v (note 1) (note 1) v dd = 4.5 v to 5.5 v v dd = 2.2 v to 5.5 v v dd = 5 v 10 % ta = 25 c [reference] (e20 c to 85 c) v dd = 3 v 10 % ta = 25 c [reference] (e20 c to 85 c) max. 5.5 5.5 5.5 7 v dd v dd v dd v dd 7 7 7 0.16v dd 0.2v dd 0.3v dd 0.15v dd 0.1v dd 24 10 12 5 4.4 1.1 17 17 typ. 5.0 0 4.0 1.0 min. 4.5 2.2 2.0 0.7v dd 0.7v dd 0.85v dd 0.5v dd 0.7v dd 0.4v dd 0.6v dd 0.85v dd 0 0 0 0 0 0.4 0.4 symbol v dd v ram v ss v ih v ih v ih v ih v ih v ih v il v il v il v il v il i ol (peak) i ol (peak) i ol (avg) i ol (avg) f(x in ) d f(x in ) notes 1: keep the total currents of i ol (avg) for ports s 0 es 3 , d 0 , d 1 , d 2 /c, d 3 /k to 50 ma or less. keep the total currents of i ol (avg) for ports f 0 , f 1 , g 0 , g 2 , g 3 and g 1 /t out pin to 30 ma or less. 2: the system clock frequency is affected by the external capacitor, resistor and lsi. accordingly, set the constants so as not to exceed the frequency limits. be careful about the input waveform when using the external clock. refer to the notes on use. unit v v v v v v v v v v v v v v v v v ma ma ma ma mhz %
mitsubishi electric 52 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer parameter l level output voltage f 0 , f 1 , s 0 es 3 , d 0 , d 1 , d 2 /c, d 3 /k l level output voltage g 0 , g 1 /t out , g 2 , g 3 h level input current f 0 , f 1 , s 0 es 3 , d 0 , d 1 , reset h level input current g 0 /int, g 1 , g 2 , g 3 , d 2 /c, d 3 /k l level input current f 0 , f 1 , s 0 es 3 , d 0 , d 1 , d 2 /c, d 3 /k, g 0 /int, g 1 , g 2 , g 3 , reset output current at off-state f 0 , f 1 , s 0 es 3 , d 0 , d 1 output current at off-state g 0 , g 1 /t out , g 2 , g 3 , d 2 /c, d 3 /k supply current pull-up transistor g 0 /int, g 1 , g 2 , g 3 , d 2 /c, d 3 /k hysteresis int hysteresis s 0 es 3 hysteresis reset test conditions v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v i = 7 v v i = v dd v i = 0 v (note) v o = 7 v v o = v dd v dd = 5 v v dd = 3 v ta = 25 c v dd = 5 v v dd = 3 v v dd = 5 v, v i = 0 v v dd = 5 v v dd = 5 v v dd = 3 v limits symbol v ol v ol i ih i ih i il i ozh i ozh i dd r pu v t+ e v te v t+ e v t e v t+ e v t e unit v v v v m a m a m a m a m a ma ma m a m a m a k w v v v v max. 2 0.9 2 0.9 1 1 e1 1 1 5 1 1 10 6 25 typ. 1.5 0.3 0.1 11 0.3 1.8 0.7 min. 5 0.1 i ol = 12 ma i ol = 6 ma i ol = 5 ma i ol = 2 ma f(x in ) = 4.0 mhz f(x in ) = 1.0 mhz at active mode at ram back-up mode note: in this case, the pull-up transistors for g 0 /int pin and ports g 1 , g 2 , g 3 , d 2 /c and d 3 /k are not selected. electrical characteristics (ta = e20 c to 85 c, v dd = 2.2 v to 5.5 v, unless otherwise noted)
mitsubishi electric 53 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer basic timing diagram clock ports d, c, k output ports d, c, k input ports f, g, s output ports f, g, s input interrupt input x in parameter pin name machine cycle state t 4 t 1 t 2 t 3 mi mi+1 d 0 ,d 1 d 0 ,d 1 d 2 /c,d 3 /k d 2 /c,d 3 /k g 0 /int,g 1 /t out g 2 , g 3 s 0 ? 3 f 0 ,f 1 g 0 /int,g 1 /t out g 2 , g 3 s 0 ? 3 f 0 ,f 1 g 0 /int t 4
mitsubishi electric 54 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 31 pin configuration of built-in prom version table 15 product of built-in prom version *: under development prom size ( 5 9 bits) 2048 words ram size ( 5 4 bits) 64 words product m34250e2-xxxfp * m34250e2fp * rom type one time prom [shipped after writing] (shipped after writing and test in factory) one time prom [shipped in blank] package 20p2n-a pin configuration (top view) built-in prom version in addition to the mask rom versions, the 4250 group has the one time prom versions whose proms can only be written to and not be erased. the built-in prom version has functions similar to those of the mask rom versions, but it has prom mode that enables writing to built-in prom. table 15 shows the product of built-in prom version. figure 31 and 32 show the pin configurations of built-in prom versions. the one time prom version has pin-compatibility with the mask rom version. v dd 2 3 4 5 6 7 8 9 10 1 19 d 2 /c x in 18 17 16 15 14 13 12 11 20 g 2 s 0 s 1 s 2 s 3 d 3 /k d 1 d 0 g 3 v ss g 1 /t out g 0 /int reset x out cnv ss f 0 f 1 m34250e2-xxxfp outline 20p2n-a
mitsubishi electric 55 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer pin configuration (top view) fig. 32 pin configuration of built-in prom version (continued) 2 3 4 5 6 7 8 9 10 1 19 18 17 16 15 14 13 12 11 20 g 2 s 0 s 1 s 2 s 3 d 3 /k d 2 /c d 1 d 0 g 3 v dd v ss (0v) g 1 /t out g 0 /int reset x in x out cnv ss f 0 f 1 m34250e 2-xxxfp ] : a resistor is connected to x ?? pin. a capacitor is connected to x ?ut pin. v pp s c?? s?a p?? v ?? ] ?ote: the state of each disconnected pin is the same as that at reset. v ?? v ss ?utline 20p 2?-a
mitsubishi electric 56 mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer fig. 33 flow of writing and test of the product shipped in blank writing with prom programmer screening (leave at 150 ?c for 40 hours) (note) verify test with prom programmer function test in target device since the screening temperature is higher than storage temperature, never expose the microcomputer to 150?c exceeding 100 hours. note: (1) prom mode the 4250 group has a function to serially input/output the command codes, addresses, and data required for operation (e.g. read and program) on the built-in prom using only a few pins. this mode can be selected by setting pins sda (serial data input/output), s clk (serial clock input), and pgm to h after connecting wires as shown in figure 32 and powering on the v dd pin, and then applying 12 v to the v pp pin. in the prom mode, three types of software commands (read, program, and program verify) can be used. clock-synchronous serial i/o is used, beginning from the lsb (lsb first). use the special-purpose serial programmer when performing serial read/program. refer to the mitsubishi data book development support tools for microcomputers about the serial programmer (serial programmer and control software, etc.) for the mitsubishi single-chip microcomputers. (2) notes on handling a high-voltage is used for writing. take care that overvoltage is not applied. take care especially at turning on the power. for the one time prom version shipped in blank, mitsubishi electric corp. does not perform prom writing test and screening in the assembly process and following processes. in order to improve reliability after writing, performing writing and test according to the flow shown in figure 33 before using is recommended (products shipped in blank: prom contents is not written in factory when shipped)
? 1997 mitsubishi electric corp. ki-9711 printed in japan (rod) ii new publication, effective nov. 1997. specifications subject to change without notice. notes regarding these materials these materials are intended as a reference to assist our customers in the selection of the mitsubishi semiconductor product best suited to the customer?s application; they do not convey any license under any intellectual property rights, or any other rights, belonging to mitsubishi electric corporation or a third party. mitsubishi electric corporation assumes no responsibility for any damage, or infringement of any third-party?s rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in these materials. all information contained in these materials, including product data, diagrams and charts, represent information on products at the time of publication of these materials, and are subject to change by mitsubishi electric corporation without notice due to product improvements or other reasons. it is therefore recommended that customers contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for the latest product information before purchasing a product listed herein. mitsubishi electric corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. the prior written approval of mitsubishi electric corporation is necessary to reprint or reproduce in whole or in part these materials. if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is prohibited. please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for further details on these materials or the products contained therein. keep safety first in your circuit designs! mitsubishi electric corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap. mitsubishi microcomputers 4250 group single-chip 4-bit cmos microcomputer
rev. rev. no. date 1.0 first edition 971130 revision description list 4250 group data sheet (1/1) revision description


▲Up To Search▲   

 
Price & Availability of M34250M2-086FP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X